//
//  CongMoneyFieldCell.m
//  CenturyCity
//
//  Created by beisheng03 on 2018/1/18.
//  Copyright © 2018年 beisheng. All rights reserved.
//

#import "CongMoneyFieldCell.h"

@interface CongMoneyFieldCell ()
@property (weak, nonatomic) IBOutlet UILabel *topLabel;
@property (weak, nonatomic) IBOutlet UITextField *bottomTextField;

@property (weak, nonatomic) IBOutlet UILabel *rightLabel;
@end

@implementation CongMoneyFieldCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.topLabel.font = MYFONT(15);
    
    self.bottomTextField.font = [UIFont boldSystemFontOfSize:17];
    
    self.rightLabel.font = MYFONT(17);
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(textChange) name:UITextFieldTextDidChangeNotification object:self.bottomTextField];
}




- (void)setModel:(GetMoneyInfoModel *)model{
    
    _model = model;
    
    [self.bottomTextField becomeFirstResponder];
    
    if (_model.money.length > 0) {
        self.bottomTextField.text = _model.money;
    }
    
    
    
}



- (void)textChange{
    

            
    self.model.money = self.bottomTextField.text;
            
            
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
